package chap12;

import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.logging.Logger;

public class LogException {
	private static  Logger log=Logger.getLogger("LogException");
	static void logexception(Exception e){
		StringWriter sw=new StringWriter();
		e.printStackTrace(new PrintWriter(sw));
		log.severe(sw.toString()+"3");
	}
	public static void main(String[] args) {
		try {
			throw new NullPointerException();
		} catch (NullPointerException e) {
			// TODO: handle exception
			logexception(e);
		}
	}

}
